package com.cynteka.cyfoman.core.config;

import java.util.*;

/**
 * User: ukman
 * Date: 14.07.2011
 * Time: 16:37:08
 */
public class ValueObject2 {
    private List<ValueObjectListener> listeners = new ArrayList<ValueObjectListener>();
    private Map<ParamMD, Object> params = new HashMap<ParamMD, Object>();

    private Object id;

    public Object getId() {
        return id;
    }

    public void setId(Object id) {
        this.id = id;
    }

    public void setParam(ParamMD param, Object value) {
        params.put(param, value);
        // fireChanged();
    }

    public Object getParam(ParamMD param) {
        return params.get(param);
    }

    public Set<ParamMD> getParams() {
        return params.keySet();
    }
    /*

    public void addListener(ValueObjectListener listener) {
        listeners.add(listener);
    }

    public void removeListener(ValueObjectListener listener) {
        listeners.remove(listener);
    }

    public void fireChanged() {
        for (ValueObjectListener listener : listeners) {
            listener.changed(this);
        }
    }

    public void firePrepareToBeStored() {
        for (ValueObjectListener listener : listeners) {
            listener.prepareToBeStored(this);
        }
    }
    */
}
